package com.isoft.data.service;


import com.isoft.data.dao.*;
import com.isoft.data.xml.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class AllService2 {
    @Autowired
    DFME_DEPE_Dao dfme_depe_dao;
    @Transactional
    public boolean addDEPE(DFME_DEPE dfme_depe){
        return dfme_depe_dao.addMETA(dfme_depe)>0 && dfme_depe_dao.addDEPE(dfme_depe)>0;
    }

    @Autowired
    DFME_DLYE_Dao dfme_dlye_dao;
    @Transactional
    public boolean addDLYE(DFME_DLYE dfme_dlye){
        return dfme_dlye_dao.addMETA(dfme_dlye)>0 && dfme_dlye_dao.addDLYE(dfme_dlye)>0;
    }

    @Autowired
    DFME_FETT_Dao dfme_fett_dao;
    @Transactional
    public boolean addFETT(DFME_FETT dfme_fett){
        return dfme_fett_dao.addMETA(dfme_fett)>0 && dfme_fett_dao.addFETT(dfme_fett)>0;
    }

    @Autowired
    FpttDao fpttDao;
    @Transactional
    public  boolean addFptt(Fptt fptt){
        return fpttDao.addMeta(fptt)>0 && fpttDao.addFptt(fptt)>0;
    }
    @Autowired
    FrttDao frttDao;
    @Transactional
    public  boolean addFrtt(Frtt frtt){
        return frttDao.addMeta(frtt)>0 && frttDao.addfrtt(frtt)>0;
    }
    @Autowired
    GtlsDao gtlsDao;
    @Transactional
    public  boolean addGtls(Gtls gtls){
        return gtlsDao.addMeta(gtls)>0 && gtlsDao.addGtls(gtls)>0 && gtlsDao.addGtlsGtlsGate(gtls)>0;
    }
    @Autowired
   CfieDao cfieDao;
    @Transactional
    public  boolean addCfie(Cfie cfie){
        return cfieDao.addMeta(cfie)>0 && cfieDao.addCfie(cfie)>0;
    }
    @Autowired
    DfdeDao dfdeDao;
    @Transactional
    public  boolean addDfde(Dfde dfde){
        return dfdeDao.addMeta(dfde)>0 && dfdeDao.addDfde(dfde)>0;
    }

}
